package com.zhengxing.jienci.mybatisplus.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhengxing.jienci.mybatisplus.pojo.User;
import com.zhengxing.jienci.mybatisplus.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @author 浪遏飞舟
 * @create 2020-09-25 11:24
 */
@RestController
public class UserController {

    @Autowired
    private UserService service;

    @RequestMapping("/query")
    public List<User> query(){
        return service.query();
    }

    @RequestMapping("/queryByMap")
    public List<User> queryByMap(){
        return service.queryByMap();
    }

    @RequestMapping("/queryById")
    public User queryById(){
        return service.queryById();
    }

    @RequestMapping("/pageQuery")
    public IPage pageQuery(){
        return service.pageQuery();
    }

    @RequestMapping("/joinList")
    public Object joinList(){
        return service.joinSel();
    }

    @RequestMapping("/pageJoinSel")
    public Object pageJoinSel(){
        return service.pageJoinSel();
    }

    @RequestMapping("/insert")
    public Object insert(){
        return service.insert();
    }

    @RequestMapping("/editById")
    public Object editById(){
        return service.edit();
    }

    @RequestMapping("/edit")
    public Object edit(){
        return service.edit();
    }



}
